# # -*- encoding: utf-8 -*-
# """
# @File    : practice.py
# @Time    : 2020/10/26 15:20
# @Author  : lluyao
# @Email   : lluyao61@163.com
# @Software: PyCharm
# """
# # def func(**num):
# #     print(num)
# #     print('my name is {name},I`m {age} years old,{sex}'.format(**num))
# #
# # func(name='lluyao',sex='nv',age='23')
# # # func('lluyao','23','nv')
#
# # def maxnum_test(x,y):
# #     print("return语句")
# #     if x>y:
# #         print("return x")
# #         return  x,y
# #     else:
# #         print('return y')
# #         return
# #     print('return语句end')
# #
# # ti = maxnum_test(2,3)
# # print(ti)
# # t2 = maxnum_test(4,3)
# # print(t2)
# # t3,t4 = maxnum_test(4,3)
# # print(t3)
# # print(t4)
#
# # lambda a,b : a if a>b else b
# # def func(y):
# #     y.append('2')
# #     print(y)
# # x =['1']
# # func(x)
# # print(x)
#
# # fp = open("song.txt")  #,encoding="utf-8"
# # print(fp.read())
# # fp1 = open('song1.txt') #,encoding='gbk'
# # print(fp1.read())
#
#
# with open("song.txt","rb") as fs:
#     for i in range(5):
#         print(fs.readline().decode("utf-8"))
#     fs.seek(0,0)
#     print(fs.read().decode("utf-8"))
#     fs.seek(-12,2)
#     print(fs.read().decode("utf-8"))
#     fs.seek(-12,2)
#     print(fs.read().decode("utf-8"))
#
#
#
with open("song.txt","rb") as f:
    for i in range(5):
        print(f.readline().decode("utf-8"),end="")
    f.seek(0,0)
    print(f.read().decode("utf-8"))
    f.seek(-12,2)
    print(f.read().decode("utf-8"))
    f.seek(-12,2)
    print(f.readline().decode("utf-8"))
